#include <functional>
#include <iostream>

using std::cout;
using std::endl;

static_assert(__cplusplus > 201103L, "Since C++14");

template <class Callable>
class DebugDecorator {
public:
    DebugDecorator(Callable c, const char* s)
        : c_(std::move(c)), s_(s)
    {}
    template <class... Args>
    auto operator()(Args&&... args) {
        cout << "Calling " << s_ << endl;
        auto ret = c_(std::forward<Args>(args)...);
        cout << "Ret: " << ret << endl;
        return ret;
    }
private:
    Callable c_;
    std::string s_;
};

template <class Callable>
auto makeTest(Callable c, const char* s) {
    return DebugDecorator<Callable>(std::move(c), s);
}